/**
 * Copyright (C) 2013 Christos Koufogiannakis
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.easychart.chart;

import java.util.ArrayList;

import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;

public class PointChart extends LineChart {
	/** 
	 * Constructor for PointChart
	 * 
	 * @param context
	 * @param attrs
	 */
	public PointChart(Context context, AttributeSet attrs) {			
		super(context, attrs);	
		initializePointChart();
	}
	
	/** 
	 * Constructor for PointChart
	 * 
	 * @param context
	 */
	public PointChart(Context context) {
		super(context);		
		initializePointChart();
	}
	
	/**
	 * Initializes point chart specific parameters
	 */	
	private void initializePointChart() {
		parameters.SHOW_LINE.setValue(false);
		parameters.VERTEX_POINT_WIDTH.setValue(3);
		parameters.SHOW_VERTEX_POINTS.setValue(true);	
	}
	
	/**
	 * Add one more population to the chart. Every value of the population
	 * is plotted with the same color
	 * 
	 * @param values is the list of values of the population
	 * @param label is the label of the population. If null value is passed
	 * then the label is assumed to be empty string.
	 * 
	 * @throws IllegalArgumentException if values is null
	 */
	public void addPopulation(ArrayList<Double> values, String label) 
			throws IllegalArgumentException {
		super.addLine(values, label);
	}
	
	/**
	 * Add one more population to the chart. Every value of the population
	 * is plotted with the same color
	 * 
	 * @param values is the list of values of the population
	 * @param label is the label of the population. If null value is passed
	 * then the label is assumed to be empty string.
	 * @param color is the color used for this population 
	 * @throws IllegalArgumentException if values is null or empty
	 */
	public void addPopulation(ArrayList<Double> values, String label, int color)
			throws IllegalArgumentException {
		super.addLine(values, label, color);
	}	
	
	@Override
	protected void onDraw(Canvas canvas) {
		super.onDraw(canvas);
	}
}
